package com.tencent.mttpacketcapture;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {
	public static final int NOTIFY_ID = 1212;
	
	
	private Button mCaptureBtn;
	private Button mStopCaptureBtn;

	
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mCaptureBtn = (Button) findViewById(R.id.toggleCapture);
        mCaptureBtn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent notificationIntentStart = new Intent(MainActivity.this, Notify.class);
				notificationIntentStart.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
				notificationIntentStart.setAction("com.tencent.mttpacketcapture.startCaputre");
				MainActivity.this.startActivity(notificationIntentStart);
				
			}
		});
        
        mStopCaptureBtn = (Button)findViewById(R.id.stopCapture);
        mStopCaptureBtn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent notificationIntentStart = new Intent(MainActivity.this, Notify.class);
				notificationIntentStart.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
				notificationIntentStart.setAction("com.tencent.mttpacketcapture.finishCapture");
				MainActivity.this.startActivity(notificationIntentStart);
			}
		});
    }
   
  
}
